Parameters db is the name or number of the database containing the records to delete.
foundSet is a boolean, true by default.
Action Deletes records in the database, either all records or all records in the current found set.
Returns True if the records were deleted, false if not.
Examples FilemakerLib.deleteAllRecords ("My Database", false) «"My Database" is now empty of data
» true
FilemakerLib.bringDBToFront ("U.S. States") «Deletes only records in the current found set.
» true
Notes This is a dangerous verb. There is no undo for deleted records. Pay special attention to whether or not you want the found set’s or the entire database’s records deleted.
Parameters db is the name or number of the database containing a record to delete.
recordNum is the index of the record you want to delete.
foundSet (optional, default is true) specifies whether the record is the nth record in the current found set (true) or in the database (false).
Action Deletes the specified record.
Returns True if the record was deleted, false if it was not.
Examples FilemakerLib.deleteRecord ("U.S. States", 1, false) «"Alabama" has been deleted: now there are 49 states in the database.
» true
Notes This is a dangerous verb. There is no undo for deleting a record. Pay special attention to whether or not you want the found set’s or the entire database’s record deleted.
Parameters db is the name or number of the database in which to find records.
searchStringList is a string or a list of search strings.
cellList is a string or a list of cells to be searched. There is a one-to-one correspondence between strings in searchStringList and cellList.
theLayout (optional, default is 0) specifies the layout on which to perform the find.
Action Sets the current found set to records matching your find parameters.
Returns The number of records in the current found set (0 or more) or false if for some reason the request could not be performed.
Examples FilemakerLib.find ("U.S. States", "Columbia", "State Name") «Find states named "Columbia" in the "U.S. States" database.
» 0
FilemakerLib.find ("U.S. States", {"Mary", "Ann"}, {"State Name", "State Capital"}) «Finds states whose name contains "Mary" and whose capital contains "Ann"
» 1
Notes This verb is a reliable method of performing Filemaker finds. It is faster on large databases than FilemakerLib.simpleFind.
This verb sends, at a minimum, five Apple events. The more fields to search, the more Apple events sent.
See Also FilemakerLib.findAll
FilemakerLib.simpleFind
Verb FilemakerLib.findAll
Syntax FilemakerLib.findAll (db)
Parameters db is the name or number of the database whose current found set should include all records.
Action Causes the current found set to contain all records.
Parameters db is the name or number of the database you want to make frontmost.
theLayout (optional, default is 0) is the name or number of the layout.
foundSet (optional, default is true) specifies whether to retrieve the last record in the current found set (true) or the last record in the database (false).
Action Retrieves the data for the last record.
Returns The data as a list.
Examples FilemakerLib.getLastRecord ("U.S. States", foundSet:false) «Get the last record in the database
» {"Wyoming", "Cheyenne", "No seafood"}
See Also FilemakerLib.getFirstRecord
FilemakerLib.getNthRecord
Verb FilemakerLib.getLayoutNames
Syntax FilemakerLib.getLayoutNames (db)
Parameters db is the name or number of the database containing the layouts whose names you want to get.
Action Asks Filemaker to return the names of the layouts.
Returns A list of the layout names, or false if the request is unsuccessful.
Examples FilemakerLib.getLayoutNames ("My Database") «Only has one default layout
» {"Layout #1"}
FilemakerLib.getLayoutNames ("U.S. States", 2) «Has two layouts, both named
Parameters db is the name or number of the database containing of the records.
dataString is the data to which the cells will be set.
firstRecord is the index of the first record.
numRecordsToSet is the number of records.
theLayout (optional, default is 0) is the name or number of the layout.
foundSet (optional, default is true) determines whether records in the current found set will be set (true) or records in the database (false).
Action Sets a cell in multiple records to the specified data.
Returns True if successful, false otherwise.
Examples FilemakerLib.setCellNRecords ("U.S. States", "Lobster", "Seafood Specialty", 2, 5) « Sets cell "Seafood Specialty" to "Lobster" for records 2 through 7 of the current found set
Parameters db is the name or number of the database you want to make frontmost.
recordNum is the index of the record containing the cell whose data will be set.
theCell is the name of the cell whose data will be set.
theData is the data to which the cell will be set.
theLayout (optional, default is 0) is the name or number of the layout.
foundSet (optional, default is true) determines whether recordNum applies to the current found set (true) or to the database (false).
Action Sets the data for a specified cell in a specified record.
Returns True if successful, false otherwise.
Examples FilemakerLib.setCellNthRecord ("U.S. States", 16, "StateName", "Mystery State", foundSet:false) «Change the name of state 16 (Kansas) to "Mystery State"
Notes This verb is most suited to small, flat databases. Larger and more complex databases should use FilemakerLib.find, which will be faster despite sending more Apple events.